package cn.zhentao.book.pojo;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName t_book
 */
@TableName(value ="t_book")
@Data
public class TBook implements Serializable {
    /**
     * 书的id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 书的名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 书的作者
     */
    @TableField(value = "author")
    private String author;

    /**
     * 书的描述
     */
    @TableField(value = "descri")
    private String descri;

    /**
     * 价格
     */
    @TableField(value = "price")
    private Double price;

    /**
     * 数量
     */
    @TableField(value = "num")
    private Integer num;

    /**
     * 书的类型
     */
    @TableField(value = "type_id")
    private Integer typeId;

    /**
     * 出版社
     */
    @TableField(value = "press_id")
    private Integer pressId;

    /**
     * 书的封面
     */
    @TableField(value = "url")
    private String url;

    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    private Date updateTime;

    /**
     * (0-上架 1-下架 2-不租借)
     */
    @TableField(value = "status")
//    @TableLogic(value = "0",delval = "1")
    private Integer status;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

   @TableField(exist = false)
    private TBookType bookType;

   @TableField(exist = false)
    private TPress tPress;
}